//编函数，计算多项式a0+a1x+a2x^2+a3x^3+...的值，并求多项式，x^3+5x^2+6x+7
//x的值由键盘输入

#include <stdio.h>
#include <math.h>

int xx(int a[],int x);

int main()
{	
	int x,y;
	int a[4] = {7,6,5,1};
	printf("input a number :");
	scanf("%d",&x);
	y = xx(a,x);
	printf("y = %d\n",y);

	return 0 ;
}

int xx(int a[],int x)
{
	int i,s=0;
	for (i=0;i<4;i++)
		s+= a[i]*pow(x,i);

	return (s);
}

		




